package com.example.demo.mapper;

import com.example.demo.model.BlogInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BlogMapper {
    // 博客列表页
    List<BlogInfo> getAll();

    // 博客详情页
    BlogInfo showBlogByBlogId(@Param("blogId")Integer blogId);

    // 删除博客
    int delBlog(@Param("blogId")Integer blogId);

    int insertBlog(@Param("title")String title,@Param("content")String content,@Param("userId")Integer userId);
}
